package com.example.botany_api.service;

import com.example.botany_api.bean.Soil;
import com.example.botany_api.mapper.SoilMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 漫画忧作
 * @Date 2022/11/5 2:09
 * @Version 1.0
 */
@Service
public class SoilService {
    @Autowired
    SoilMapper soilMapper;
    //    管理员土壤知识
//    分页
    public List getSoil(String name, String summary, String type, int current, int size) {
        return soilMapper.getSoil(name, summary, type, current, size);
    }

    //    总数
    public int getSoilTotal(String name, String summary, String type) {
        return soilMapper.getSoilTotal(name, summary, type);
    }

    //    删除土壤知识
    public int dl_Soil(int id) {
        return soilMapper.dl_Soil(id);
    }


    //    添加土壤知识
    public int add_Soil(Soil soil) {
        return soilMapper.add_Soil(soil);
    }

    //    修改土壤知识
    public int up_Soil(Soil soil) {
        return soilMapper.up_Soil(soil);
    }
}
